package com.example.mouther_bg.Bean;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.ObjectReader;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("video")
public class Video {
    @TableId
    private int id;
    private String uId;
    private String videoTitle;
    private String videoContent;
    private String videoPath;
    private String coverPath;
    private String videoClassify;
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") // java转json指定指定的格式
    @DateTimeFormat(pattern = "yyyy-MM-dd") // springMVC接收日期的格式
    private Date showTime;//创建时间
    private List<User> users;
    private List<Comment> comments;
}
